import * as React from 'react'
import classNames from 'classnames'

import { RowProps, RowState } from './interface'

class Row extends React.Component<RowProps, RowState> {
  static defaultProps = {
    gutter: 0,
    prefixCls: 'layui-row'
  }

  constructor(props: RowProps) {
    super(props)
    this.state = {
      screens: {}
    }
  }

  render() {

    const {
      prefixCls,
      justify,
      align,
      className,
      style,
      children,
      gutter,
      ...restProps
    } = this.props;
    
    const classes = classNames(prefixCls, className, {
        [`layui-col-space${gutter}`]: gutter != 0
      }
    )

    return (
      <div {...restProps} className={classes}>
        {children}
      </div>
    )
  }

}

export default Row